export /** 深层代理
 *
 *
 * @param {*} obj
 * @param {*} handler proxy 代理陷阱
 * @return {*}
 */
const deepProxy = function(obj, handler) {
  const proxy = deepObject => new Proxy(deepObject, handler);

  const nextTime = tropTarget => {
    if (typeof tropTarget === 'object') {
      return deepProxy(tropTarget, handler);
    }
    return tropTarget;
  };
  if (typeof obj === 'object') {
    for (const key in obj) {
      obj[key] = nextTime(obj[key]);
    }
    return proxy(obj);
  }

  throw new TypeError('arguments must be object or array');
};
